<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<script th:inline="javascript">
	$("select[name='[(${fieldNo})]']").change(function() {
		onPageNoCtlChange();
	});
	$("select[name='[(${fieldYear})]']").change(function() {
		onPageNoCtlChange();
	});

	function onPageNoCtlChange() {
		if (o("[(${fieldNo})]") && o("[(${fieldNo})]").value=="") {
			o("[(${fieldName})]").value = "";
			return;
		}

		var ajaxData = {
			op: "getNo",
			flowId: "[(${flowId})]",
			fieldName: "[(${fieldName})]",
			[(${fieldNo})]: o("[(${fieldNo})]").value,
			[(${fieldYear})]: o("[(${fieldYear})]").value,
			desc: "[(${desc})]"
		};
		ajaxPost('/flow/macro/getPaperno', ajaxData).then((data) => {
			console.log('data', data);
			findObj("[(${fieldName})]").value = $.trim(data);
		});
	}
</script>
</body>
</html>